package gzx.datalayer.Data.BTSXunJian
{
	import mx.controls.Alert;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.remoting.RemoteObject;

	public class XunJianQuery
	{
		private var remoteObject:RemoteObject
		
		public var onErrorFunction:Function;
		
		public function XunJianQuery()
		{
			remoteObject  = new RemoteObject("fluorine");
			remoteObject.source = "RemoteFlunorineFx.BTSXunJian.XunJianQuery";
			
//			remoteObject.GetSysParamPianQuInfo.addEventListener("result",GetSysParamPianQuInfo_ResultHandler);
			
			remoteObject.addEventListener("fault", onFault);
			
//			onReceive_GetSysParamPianQuInfo = null;
			
			onErrorFunction = null;
		}
		
		//=========================
		public function onFault (event:FaultEvent):void
		{
			if(onErrorFunction!=null)
			{
				onErrorFunction();
			}
			else
			{
				Alert.show(event.fault.faultString, "Error");
			}
		}
	}
}